package com.example.demo.service.imple;

import com.example.demo.bean.SysPermission;
import com.example.demo.bean.SysRole;
import com.example.demo.bean.UserInfo;
import com.example.demo.dao.mapper.SysRoleMapper;
import com.example.demo.dao.mapper.UserInfoMapper;
import com.example.demo.service.UserInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 时间: 2018/5/31.
 *
 * @author zwf
 */
@Service
public class UserInfoServiceImpl implements UserInfoService{
    @Resource
    UserInfoMapper userInfoMapper;

    @Resource
    SysRoleMapper sysRoleMapper;


    @Override
    public UserInfo findByUsername(String username){

        return userInfoMapper.findByUsername(username);
    }

    @Override
    public List<SysRole> getRoleList(String username) {
        return userInfoMapper.getRoleList(username);
    }

    @Override
    public List<SysPermission> getPermission(String Role){
        return sysRoleMapper.getPermission(Role);
    }
}
